package basic50.fiftieth;

import java.util.Scanner;

public class Basic49 {
    public static void main(String[] args) {
        //题目：计算字符串中子串出现的次数
        // ssrsssrssrssr ssr 4
        Scanner sc = new Scanner(System.in);
        String str = sc.nextLine();
        String s = sc.nextLine();
        count(str,s);
    }

    private static void count(String str, String s) {
        int count = 0;
        int index = 0;
        // indexOf(str,index) 返回从index开始，出现str的位置，没有返回-1
        while ((index = str.indexOf(s, index)) != -1) {
            count++;
            index += s.length();
        }
        System.out.println(count);
    }
}
